#ifndef DATATEMP_H
#define DATATEMP_H

#include <QObject>

class DataTemp : public QObject
{
    Q_OBJECT
public:
    explicit DataTemp(QObject *parent = nullptr);
static   DataTemp *getObject();
/**
 * @brief 以下是用来存储值的变量
 */

double b1_tem= -1000;
double b1_hum1= -1000;
double b1_hum2= -1000;
double b1_light= -1000;
double b1_press= -1000;

double b2_tem= -1000;
double b2_hum1= -1000;
double b2_hum2= -1000;
double b2_light= -1000;
double b2_press= -1000;

bool b1_water1 = false;
bool b1_water2 = false;

bool b2_water1 = false;
bool b2_water2 = false;


QString deviceId;
QString deviceKey;
QString identification;//用来记录身份识别码
int reqTime  = 9;
int uploadTime =9;
int mode = 0;
QString serialName;
int serialBaudRate;
QString netIp;
int netPort;
void saveData();
void initData();



protected:
static DataTemp *obj;

signals:


public slots:
};

#endif // DATATEMP_H
